# 导包
from rest_framework import serializers
# 导入数据库类
from myapp.models import User,Goods,Category


# 声明序列化类对象
class UserSer(serializers.ModelSerializer):
    # 声明字段
    class Meta:
        model = User
        fields = '__all__'
# 声明序列化类对象
class GoodsSer(serializers.ModelSerializer):
    # 声明字段
    class Meta:
        model = Goods
        fields = '__all__'

# 声明序列化类对象
class CategorySer(serializers.ModelSerializer):
    # 声明字段
    class Meta:
        model = Category
        fields = '__all__'
